In OOP what is the name of the blueprint for creating objects?
Class
Given a Class blueprint for a Car has the following attributes and methods, which line of code in the answers will produce an error?
Attributes:
num_of_seats
speed
Methods:
drive()
brake()
car.brake = 0
brake is a method, which means it's a function associated with the car object. Functions still need to be called with a ().
my_toyota = Car() my_fiat = Car()
What word would you use to describe what's inside my_toyota and my_fiat?
Object
Correct! my_toyota and my_fiat are variables and each contains a Car object.